package act.strategy;

/**
 * @Author: fxy
 * @Date: 2022/03/17/14:45
 * @Description:
 */
public interface Strategy {
    int doOperation(int num1, int num2);
}
class OperationAdd implements Strategy{
    @Override
    public int doOperation(int num1, int num2) {
        return num1 + num2;
    }
}

class OperationSubtract implements Strategy{
    @Override
    public int doOperation(int num1, int num2) {
        return num1 - num2;
    }
}

class OperationMultiply implements Strategy{
    @Override
    public int doOperation(int num1, int num2) {
        return num1 * num2;
    }
}

